#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
bool cmp(pair<int, int>p1, pair<int, int>p2) {
    return p1.second < p2.second;
}
void printArr(int*arr, int n) {
    for (int i = 0; i < n;i++) {
        cout << arr[i] << "//";
    }
    cout << endl;
}

void printArr(char*arr, int n) {
    for (int i = 0; i < n;i++) {
        cout << arr[i] << "//";
    }
    cout << endl;
}

void printArr(vector<pair<int, int>> &vec, int n) {
    for (int i = 0; i < n;i++) {
        cout << vec[i].first << "//" << vec[i].second << endl;
    }
    cout << "  end " << endl;
}

int main(void)
{
    string in;
    while (getline(cin, in, '\n'))
    {
        int length = in.length();
        int size[26] = {0,};
        int min = -1;
        vector<pair<int, int>> vec;
        for (int i = 0; i < length; i++)
        {
            size[in.at(i) - 'a']++;
        }
        for (int i = 0; i < 26; i++)
        {
            vec.push_back(pair<int, int>(i, size[i]));
        }
        sort(vec.begin(), vec.end(), cmp);

        for (int i = 0; i < vec.size(); i++) {
            if (vec[i].second != 0) {
                min = vec[i].second;
                break;
            }
        }
        char tmp[27] = "";
        int j = 0;
        for (int i = 0; i < vec.size(); i++) {
            if (vec[i].second == min) {
                tmp[j++] = vec[i].first + 'a';
            }
        }
        string ttmp(tmp);
        for (int i = 0; i < length; i++) {
            if (ttmp.find(in.at(i)) == string::npos) {
                cout << in.at(i);
            }
        }
        cout << endl;
    }

    return 0;
}
